Optimal. Leaf size=46 \[ -\frac {\tanh ^{-1}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3590, 212}
\begin {gather*} -\frac {\tanh ^{-1}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{d \sqrt {a^2+b^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 3590
Rubi steps
\begin {align*} \int \frac {\sec (c+d x)}{a+b \tan (c+d x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,\cos (c+d x) (b-a \tan (c+d x))\right )}{d}\\ &=-\frac {\tanh ^{-1}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 45, normalized size = 0.98 \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 43, normalized size = 0.93
method | result | size |
derivativedivides | \(\frac {2 \arctanh \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}\) | \(43\) |
default | \(\frac {2 \arctanh \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}}\) | \(43\) |
risch | \(\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}\, d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}\, d}\) | \(88\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 80, normalized size = 1.74 \begin {gather*} -\frac {\log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 131 vs.
\(2 (44) = 88\).
time = 0.41, size = 131, normalized size = 2.85 \begin {gather*} \frac {\log \left (-\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{2 \, \sqrt {a^{2} + b^{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec {\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.51, size = 74, normalized size = 1.61 \begin {gather*} -\frac {\log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.75, size = 39, normalized size = 0.85 \begin {gather*} -\frac {2\,\mathrm {atanh}\left (\frac {b-a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{d\,\sqrt {a^2+b^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________